from rest_framework import serializers
from goods.models import SpecificationOption, SPUSpecification
from meiduo_admin.mypakge import *


class spec_option___OptionSerializer(serializers.ModelSerializer):
    spec_id = serializers.IntegerField()
    spec = serializers.StringRelatedField()
    class Meta:
        model = SpecificationOption
        fields = '__all__'

class spec_option___OptionSimpleSerializer(serializers.ModelSerializer):
    class Meta:
        model = SPUSpecification
        fields = '__all__'